package com.jiawa.train.business.service;

import com.jiawa.train.business.domain.DailyTrainStation;
import com.jiawa.train.business.domain.Train;
import com.jiawa.train.business.req.DailyTrainStationQueryReq;
import com.jiawa.train.business.req.DailyTrainStationSaveReq;
import com.jiawa.train.business.resp.DailyTrainStationQueryResp;
import com.jiawa.train.common.resp.PageResp;

import java.util.Date;
import java.util.List;

/**
 * @author zzl
 * @version 1.0
 */
public interface DailyTrainStationService {
    void save(DailyTrainStationSaveReq req);

    /**
     * 分页查询高铁每日经停站数据
     * @param req
     * @return
     */
    PageResp<DailyTrainStationQueryResp> queryList(DailyTrainStationQueryReq req);

    void delete(Long id);

    /**
     * 根据日期和高铁车次生成每日高铁经停站数据
     * @param date
     * @param train
     */
    void genDailyTrainStation(Date date, Train train);

    /**
     * 根据日期和高铁车次查询每日高铁经停站数据
     * @param date
     * @param code
     * @return
     */
    List<DailyTrainStation> selectByDateAndTrainCode(Date date, String code);

    /**
     * 根据日期和车次，统计每日高铁经停站数
     * @param date
     * @param trainCode
     * @return
     */
    long countByTrainCode(Date date, String trainCode);
}
